package day240605;

import java.lang.reflect.Parameter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Regex {
    public static void main(String[] args) {
         String input="480-879-774";
        System.out.println(input.matches("\\d{3}-\\d{3}-\\d{3}"));



        Pattern compile = Pattern.compile("\\d{3}-\\d{3}-\\d{3}");
        Matcher matcher= compile.matcher("\\d{3}-\\d{3}-\\d{3}");
        System.out.println(matcher.matches());
    }
}
